<?php

if(!defined("INDEX"))
    die;
    
if(!check_get('id')) {
    header('Location: /');
    exit;
}

// ----------------------------------------------------------------------------

$release = null;

try {
    $release = Release::getById($_GET['id']);

} catch (Exception $e) {
   //echo $e->getMessage();
}

if(!($release instanceof Release))
    throw new Exception(_('Sorry, no such release.'));

$smarty->assign('release', $release);

$smarty->assign('comments', $release->getComments());
$smarty->assign('watched', $release->isWatchedByUser($user->id));